<?php include 'includes/header.php';?>
<?php include 'includes/bar.php';?> 
<!--Start MainContent Wrapper-->
<div class="maincontentWrapper">

<?php include 'includes/sidenav.php';?>
<?php include 'includes/categorynav.php';?>
<script type="text/javascript">
function changeTotalPrice(quantity , itemprice){

	   total =  (parseFloat(quantity.value) * parseFloat(itemprice));


		document.getElementById('totalItemPrice').innerHTML = total;
	   document.getElementById('subTotalPrice').innerHTML = total;
	   document.getElementById('total').innerHTML = total;
}
</script>
		
    <!--    <div class="miniMasthead"><img src="/assets/mcchampdeals/images/masthead.png" /></div>-->
  <!--Start ProductContainer-->
        <div class="productContainer">
        <div id="productContent">
			<table width="100%" border="0" cellspacing="o" cellpadding="o" color="black">
			  <tr>
				<td width="100%" valign="top" style="color:black">
					<div class="barnavInner" style="width:658px;">Check out confirmation</div>
				</td>
			   </tr>
			   <tr>
				<td width="100%" valign="top" style="color:black">
					<table  width="100%" valign="top" style="color:black">
						<tr>
						  <td width="4%">&nbsp;</td>
							<td width="47%">
								Payment Method
							</td>
							<td width="49%">
								Payment Address (<?=$this->session->userdata('transaction_sendasgift')?>)
							</td>
							<tr>
							<td  valign="top">&nbsp;</td>
							<td  valign="top">
								<?php 
								if($this->session->userdata("transaction_modeofpayment") != null){
									$modeofpayment= $this->session->userdata("transaction_modeofpayment");
									
									if($modeofpayment == "onlinepayment"){
										echo "Credit Card<br><br>";
										echo $paymentMessage->online_payment;
									}
									if($modeofpayment == "banktransfer"){
										
										echo "Bank Transfer";
										echo "<br><br>";
										echo $paymentMessage->bank_transfer;
										//echo "Please Make yout Bank Transfer to MC Home Depot, Inc.<br>Banco De Oro No. 550046003";
									}
									if($modeofpayment == "westernunion"){
										echo "Western Union";
										echo "<br><br>";
										echo $paymentMessage->western_union;
										//echo "Please Make yout Transfer to Ms.Josephine <br>Occidental c/o MC Home Depot, Inc.";
								
									}
								}
								?>
							</td>
							<td>
							<br>
								<?=isset($addressbook->firstname)?$addressbook->firstname:""?><br>
								<?=isset($addressbook->lastname)?$addressbook->lastname:""?><br>
								<?=isset($addressbook->company)?$addressbook->company:""?><br>
								<?=isset($addressbook->address1)?$addressbook->address1:""?><br>
								<?=isset($addressbook->address2)?$addressbook->address2:""?><br>
								<?=isset($addressbook->city)?$addressbook->city:""?><br>
								<?=isset($addressbook->postalcode)?$addressbook->postalcode:""?><br>
								<?=isset($addressbook->region)?$addressbook->region:""?><br>
								<?=isset($addressbook->country)?$addressbook->country:""?><br>
							</td>
						</tr>
						
						
					</table>
				</td>
				
			   </tr>
			   
			   </table>
			   
			   </div>
			   
			   <FORM action="<?=DEALURL?>/transactioncomplete/<?=$individualdeal->id;?>" method="post">
			   <div id="productContent">
			   
				   <table width="100%">
				   <tr>
				   <td width="100%" valign="top" style="color:black">
						<table  width="100%" cellpadding="5" cellspacing="0" style="color:black" valign="top">
							<tr>
							  <th colspan="5" align="left" >&nbsp;</th>
						  </tr>
							<tr>
							  <th width="4%" height="35" align="left" bgcolor="#f1f1f1" >&nbsp;</th>
								<th width="28%" align="left" bgcolor="#f1f1f1" >Product</th>
								<th width="29%" bgcolor="#f1f1f1" >Quantity</th>
								<th width="19%" bgcolor="#f1f1f1" >Price</th>
								<th width="20%" bgcolor="#f1f1f1" >Total</th>
							</tr>
							<tr>
							  <td align="left" valign="top" >&nbsp;</td>
								<td height="47" align="left" valign="middle" ><?=$individualdeal->name;?></td>
						    <td align="center" valign="middle" >1<input value="1" type="hidden" name="quantity"></td>
							  <td align="center" valign="middle" ><?=$individualdeal->price;?></td>
								<td align="center" valign="middle" ><span id="totalItemPrice"><?=$individualdeal->price;?></span></td>
							</tr>
							<tr>
								<td align="right"  colspan="4"> Sub-Total :</td>
								<td align="center"> <span id="subTotalPrice"><?=$individualdeal->price;?></span></td>
							</tr>
							<tr>
								<td colspan="4" align="right"> Pick Up :</td>
								<td align="center"> <span id="">0</span></td>
							</tr>
							<tr>
							  <td  colspan="4" align="right">Total :</td>
							  <td align="center"><?=$individualdeal->price;?></td>
						  </tr>
							<tr>
								<td  colspan="4" align="right">&nbsp;</td>
								<td align="center">&nbsp;</td>
							</tr>
                            <tr>
								<td  colspan="4" align="right"></td>
							</tr>
						</table>
					</td>
				   </tr>
				  </table>
				</div>
				
				
				 <div id="productContent">
				   <table width="100%">
				   <tr>
					   <td width="100%" valign="top" style="color:black">
							<table  width="100%" valign="top" style="color:black">
								<tr>
									<th width="27%" ><input type="button" onclick="javascript:window.location='<?=DEALURL?>/view/<?=$individualdeal->id;?>'" value="Back" class="btn"/></th>
									<th width="6%" ></th>
									<th width="47%" ></th>
									<th width="20%" ><input type="submit" value="Confirm Order" class="btn"></th>
								</tr>
							</table>
						</td>
				   </tr>
				  </table>
				</div>
				</form>
        <!--end of ProductContainer-->
       </div>
      <!--End of Main content Wrapper-->
      </div>
<!--end of rightpane-->
<?php include 'includes/footer.php'; ?>